﻿using Microsoft.AspNetCore.Http;

namespace Yarp.ReverseProxy.Idenmptency
{
    /// <summary>
    /// 接口：Yarp幂等性请求生成器，用来定制生成Yarp请求，
    /// 例如你可以以自定义的生成方式，将HttpContext请求转换成
    /// App特定的幂等性请求（可直接用也可继承于YarpIdenmpotencyRequest）
    /// </summary>
    public interface IYarpIdenmpotencyRequestGenerator
    {
        /// <summary>
        /// 生成
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public YarpIdenmpotencyRequest Generate(HttpContext context, RequestDelegate next);
    }
}
